<template>
  <div style="display: inline-block">
    <template v-for="(item, index) in options">
      <template v-if="values.includes(item.value)">
        <span :index="index" >{{ item.label }}</span
        >
      </template>
    </template>
  </div>
</template>
  
  <script>
export default {
  props: {
    options: {
      type: Array,
      default: () => [],
    },
    value: [Number, String, Array],
    showLevel: {
      type: Boolean,
      default: false,
    },
  },
  computed: {
    values() {
      if (this.value !== null && typeof this.value !== "undefined") {
        return Array.isArray(this.value) ? this.value : [String(this.value)];
      } else {
        return [];
      }
    },
  },
  mounted() {},
  watch: {
    values: {
      handler(newValue, oldValue) {
      
      },
      deep: true,
      immediate: true,
    },
  },
};
</script>
  <style  lang="scss" scoped>
.el-tag + .el-tag {
  margin-left: 10px;
}

</style>